package imoocvideodev.service.impl;

import imoocvideodev.common.result.IMoocJSONResult;
import imoocvideodev.dao.BGMMapper;
import imoocvideodev.pojo.BGM;
import imoocvideodev.pojo.Users;
import imoocvideodev.service.BgmService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

/**
 * @Author: Redi
 * @Date: 2021/2/6 20:37
 * @Description: bgm服务实现类
 */
@Service
public class BgmServiceImpl implements BgmService {

    @Autowired
    BGMMapper bgmMapper;

    @Transactional(propagation = Propagation.SUPPORTS)
    @Override
    public List<BGM> getAllBgm(){
        return bgmMapper.selectAllBGM();
    }

    public BGM getBgmById(String bgmId){
        return bgmMapper.selectByPrimaryKey(bgmId);
    }
}
